<?php

/**
 * 智能名片
 */

namespace app\api\controller;

use app\common\controller\ApiController;
use think\Exception;
use app\api\model\Radar as RadarModel;
use app\api\model\AgentAttention;
use app\api\model\AgentRemind;
use app\common\lib\RespCode;

class Radar extends ApiController {

    protected $isArrayResult = [];

    /**
     * 雷达列表
     */
    public function getRadarList() {
        try {
            $params = $this->checkParams ('page');
            $RadarModel = new RadarModel();
            $pageSize=10;//每页显示数据数
            $data = $RadarModel->getRadarList ($params,$pageSize);
            return $this->resData ('success', $data);
        } catch (Exception $e) {
            return $this->resErr ($e->getMessage (), $e->getCode ());
        }
    }

    /**
     * 客户数据统计
     * @return false|string
     */
    public function getCusStatistical(){
        try {
            $params = $this->checkParams ('');
            $RadarModel = new RadarModel();
            $data = $RadarModel->getCusStatistical ($params);
            return $this->resData ('success', $data);
        } catch (Exception $e) {
            return $this->resErr ($e->getMessage (), $e->getCode ());
        }
    }

    public function getRadarBanner(){
        try {
            $params = $this->checkParams ('');
            $RadarModel = new RadarModel();
            $data = $RadarModel->getRadarBanner ();
            return $this->resData ('success', $data);
        } catch (Exception $e) {
            return $this->resErr ($e->getMessage (), $e->getCode ());
        }
    }






}
